<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page contentType="text/html" pageEncoding="UTF-8" import="course.*,java.util.*"%>
<%@ include file="SessionCheck.jsp"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>课程管理</title>
<style type="text/css">
<!--
.STYLE2 {
	font-size: xx-large
}
-->
</style>
</head>

<body bgcolor="#CCCCCC">
    <%
    Course c=new Course();
    String tId=teacher.getId();
    ArrayList<Course> courses=c.findByTid(tId);
    %>
<div align="center">
<table width="890" border="0" cellspacing="0" align="center"  bgcolor="#FFFFFF">
  <tr>
    <td ><img src="../images/rg.jpg" alt="" width="892" height="142" /></td>
  </tr>

  <tr>
    <td height="349"><p align="center" class="STYLE2">课程信息管理</p>
    <table width="724" border="1" cellspacing="0" align="center" style="font-size: 12px;">
      <tr>
        <td width="120"><div align="center">课程编号</div></td>
        <td width="129"><div align="center">课程名称</div></td>
        <td width="115"><div align="center">课程类别</div></td>
        <td width="130"><div align="center">修改课程信息</div></td>
        <td width="100"><div align="center">删除</div></td>
      </tr>
        <%
        for(int i=0;i<courses.size();i++){
        %>
      <tr>
        <td nowrap="nowrap"><div align="center"><%=courses.get(i).getCid()%></div></td>
        <td nowrap="nowrap"><div align="center"><%=courses.get(i).getCname()%></div></td>
        <td nowrap="nowrap"><div align="center"><%=courses.get(i).getCategory()%></div></td>
        <td nowrap="nowrap"> <form action="changeCourseInfo.jsp" method="post">
                <div align="center">
                  <input type="hidden" name="c_id" value="<%=courses.get(i).getCid()%>" />
                  <input type="submit" name="change"  value="修改" />
                </div>
        </form></td>
        <td nowrap="nowrap">
            <form action="delete.jsp" method="post">
                <div align="center">
                  <input type="hidden" name="c_id" value="<%=courses.get(i).getCid()%>" />
                  <input type="submit" name="delete"  value="删除" onclick="return confirm('确定要删除该课程？')"/>
                </div>
            </form></td>
      </tr>
     <%}%>
    </table>    
    
      <div align="center">
          <p><form id="form1" name="form1" method="post" action="addcourse.jsp">
            <input type="submit" name="添加课程" id="添加课程" value="添加课程" /></form>　　　　
          </p>
          <p><a href="index.jsp">返回首页</a> </p>
      </div>
      <p align="center">&nbsp;</p></td>
  </tr>

</table></div>
</body>

